<p class="Head1"><help:link Id="66617">InputBox Function [Runtime]</help:link></p>
<p class="Paragraph">Displays a prompt in a dialog at which the user can input text. The input is assigned to a variable.</p>
</help:to-be-embedded>
<p class="Paragraph">The <span class="T1">InputBox</span> statement is a convenient method of entering text via a dialog. Confirm the input by clicking OK or pressing Return. The input is returned as the function return value. If you close the dialog with Cancel, <span class="T1">InputBox</span> returns a zero-length string ("").</p>
<p class="Paragraph">InputBox (Msg As String[, Title As String[, Default As String[, x_pos As Integer, y_pos As Integer]]]]) <help:key-word value="InputBox" tag="kw66617_1" xmlns:help="http://openoffice.org/2000/help"/></p>
<p class="Paragraph">Msg: String expression displayed as the message in the dialog box.</p>
<p class="Paragraph">Title: String expression displayed in the title bar of the dialog box.</p>
<p class="Paragraph">Default: String expression displayed in the text box as default if no other input is given.</p>
<p class="Paragraph">x_pos: Integer expression that specifies the horizontal position of the dialog. The position is an absolute coordinate and does not refer to the window of the office application.</p>
<p class="Paragraph">y_pos: Integer expression that specifies the vertical position of the dialog. The position is an absolute coordinate and does not refer to the window of the office application.</p>
<p class="Paragraph">If <span class="T1">x_pos</span> and <span class="T1">y_pos</span> are omitted, the dialog is centered on the screen. The position is specified in <help:popup Id="66636" Eid="twips" xmlns:help="http://openoffice.org/2000/help">twips</help:popup>.</p>
<p class="P2">Example:</p>
<p class="PropText">Sub ExampleInputBox</p>
<p class="PropText">Dim sText As String</p>
<p class="PropText">sText <text:s text:c="" xmlns:text="http://openoffice.org/2000/text"/>= InputBox ("Please enter a phrase:","Dear User")</p>
<p class="PropText">MsgBox ( sText , 64, "Confirmation of phrase")</p>